<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" >
<head>
    <head th:include="common/global :: global('产品购买','weChat/product','productEntity/productEntity')">

</head>
<body>
<div th:replace="common/head :: head('产品购买')">

</div>

<input type="hidden" th:value="${productEntityId}" id="productEntityId">


<!-- 详情 -->
<div class="content">
    <img th:src="${productEntity.picUrl}" alt="">
</div>
<!-- 购买按钮 -->
<button class="sub_button">立即购买</button>


<!-- 购买信息 -->
<div class="background_box">

</div>
<div class="purchase_details">
    <div class="box_purchase">
        <div class="top">
            <div class="img_box">
                <img th:src="${productEntity.productEntityPic}" alt="">
            </div>
            <input type="hidden" id="price" >
            <div class="price_details">
                <h5 th:text="${productEntity.name}"></h5>
                <h2 th:text="${'￥'+#numbers.formatDecimal(productEntity.price/100.00,1,2)}"></h2>
                <div class="amount">
                    <span>数量</span>
                    <span class="amount_box">
							<a href="javascript:void(0);" class="ii1">-</a>
							<input type="text" value="1" class="">
							<a href="javascript:void(0);" class="ii2">+</a>
					</span>
                    <script>
                        $(function(){
                            $(".amount_box a:eq(0)").click(function () {
                                var amount = parseInt($(".amount_box input[type='text']").val());
                                amount -= 1;
                                if (amount < 1) {
                                    alert("数量最少是1！");
                                    return;
                                }
                                $(".amount_box  input[type='text']").val(amount);
                            });
                            $(".amount_box a:eq(1)").click(function () {
                                var amount = parseInt($(".amount_box input[type='text']").val());
                                amount += 1;
                                $(".amount_box  input[type='text']").val(amount);
                            });
                        })
                    </script>
                </div>
            </div>
            <span class="esc"><img src="/img/weChat/esc.png" alt=""></span>
        </div>

<!--        <div class="package">
            <h2>套餐</h2>
            <div class="package_box">u
                <span class="hover1">套餐一</span>
                <span>套餐二</span>
                <span>套餐三</span>
                <span>套餐四</span>
            </div>
        </div>-->

            <!-- 电话和收货人 -->
            <!--<div class="contact_box">-->
                <!--<h2>联系方式</h2>-->

                <!--<input type="text" class="contacts" placeholder="收货人姓名" name="userName"  th:value="${session.USER?.getUserName()}">-->
           <!--<input type="text" class="telephone" placeholder="收货人联系电话" name="phone"  th:value="${session.USER?.getPhone()}">-->
                <!--<h2>收货地址</h2>-->
                <!--<div name="userAddress" class="address" contenteditable="true" placeholder="收货详细地址" th:text="${session.USER?.getUserAddress()}"></div>-->
            <!--</div>-->
        <!-- 确定信息 -->
        <div class="button_box">
            <button class="Shopping_Cart">加入购物车</button>
             <button class="determine">确认购买</button>
        </div>
    </div>
    <div class="popup">
        <h5>成功加入购物车</h5>
        <button>确定</button>
    </div>

</div>




</body>
</html>